package com.capacity.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.capacity.mapper.CscIndustryInfoMapper;
import com.capacity.domain.CscIndustryInfo;
import com.capacity.service.ICscIndustryInfoService;

/**
 * 产品品类Service业务层处理
 * 
 * @author fz
 * @date 2024-02-01
 */
@Service
public class CscIndustryInfoServiceImpl implements ICscIndustryInfoService 
{
    @Autowired
    private CscIndustryInfoMapper cscIndustryInfoMapper;

    /**
     * 查询产品品类
     * 
     * @param id 产品品类主键
     * @return 产品品类
     */
    @Override
    public CscIndustryInfo selectCscIndustryInfoById(Long id)
    {
        return cscIndustryInfoMapper.selectCscIndustryInfoById(id);
    }

    /**
     * 查询产品品类列表
     * 
     * @param cscIndustryInfo 产品品类
     * @return 产品品类
     */
    @Override
    public List<CscIndustryInfo> selectCscIndustryInfoList(CscIndustryInfo cscIndustryInfo)
    {
        return cscIndustryInfoMapper.selectCscIndustryInfoList(cscIndustryInfo);
    }

    /**
     * 新增产品品类
     * 
     * @param cscIndustryInfo 产品品类
     * @return 结果
     */
    @Override
    public int insertCscIndustryInfo(CscIndustryInfo cscIndustryInfo)
    {
        cscIndustryInfo.setCreateTime(DateUtils.getNowDate());
        return cscIndustryInfoMapper.insertCscIndustryInfo(cscIndustryInfo);
    }

    /**
     * 修改产品品类
     * 
     * @param cscIndustryInfo 产品品类
     * @return 结果
     */
    @Override
    public int updateCscIndustryInfo(CscIndustryInfo cscIndustryInfo)
    {
        cscIndustryInfo.setUpdateTime(DateUtils.getNowDate());
        return cscIndustryInfoMapper.updateCscIndustryInfo(cscIndustryInfo);
    }

    /**
     * 批量删除产品品类
     * 
     * @param ids 需要删除的产品品类主键
     * @return 结果
     */
    @Override
    public int deleteCscIndustryInfoByIds(Long[] ids)
    {
        return cscIndustryInfoMapper.deleteCscIndustryInfoByIds(ids);
    }

    /**
     * 删除产品品类信息
     * 
     * @param id 产品品类主键
     * @return 结果
     */
    @Override
    public int deleteCscIndustryInfoById(Long id)
    {
        return cscIndustryInfoMapper.deleteCscIndustryInfoById(id);
    }
}
